<?php
$this->adgeek_view->backyard_header();
?>
<div id="tablesorter_container">
<table class="tablesorter">
	<thead>
		<tr>
			<?php foreach($table_header as $key=>$val){
					if($key=='actions'){
						echo '<th colspan=2>'.$table_header[$key].'</th>';
					} 
					else{
						echo '<th>'.$table_header[$key].'</th>';
					}
			} ?>
		</tr>
	</thead>
	<tbody>
		<?php
		
		 foreach($publisher_info as $child_key=>$child){
				echo '<tr>';
				// publisher info
				echo '<td>'.$child['accountId'].'</td>';
				//echo '<td>'.$child['googleID_ContentAds'].'</td>';
				echo '<td>'.$child['websiteUrl'].'</td>';
				
				// status
				if(!empty($bulkAssociationStatus[$child['accountId']])){
				//if(!empty($bulkAssociationStatus[$child['googleID_ContentAds']])){
					if( $bulkAssociationStatus[$child['accountId']]== 'DISABLED'){
						echo '<td><span style="color:#FF3366;">'.$bulkAssociationStatus[$child['accountId']].'</span></td>';
					}
					else{
						echo '<td>'.$bulkAssociationStatus[$child['accountId']].'</td>';	
					}
				}
				else{
					echo '<td></td>';
				}
				
				if(!empty($child['AFC'])){
					echo '<td><a href="/backyard/create_content_ads/'.$child['accountId'].'">Generate AFC Code</a>&nbsp;|&nbsp;<a href="/backyard/show_content_ads/'.$child['accountId'].'">Show AFC</a></td>';
				}
				else{
					echo '<td></td>';
				}
				
				if(!empty($child['AFS'])){
					echo '<td><a href="/backyard/create_search_ads/'.$child['accountId'].'">Generate AFS Code</a>&nbsp;|&nbsp;<a href="/backyard/show_search_ads/'.$child['accountId'].'">Show AFS</a></td>';
				}
				else{
					echo '<td></td>';
				}
				
				echo '</tr>';
		} ?>
	</tbody>
</table>
</div>
<?php
$this->adgeek_view->footer();
?>